﻿using System;
using System.Collections.ObjectModel;
using Mono.Cecil;
using Reflector.CodeModel;

namespace CallGraphExtractor.CecilAdapter
{
    class Assembly : IAssembly
    {
        #region Fields

        private AssemblyDefinition mAssemblyDefinition;

        #endregion Fields

        #region Lifecycle

        public Assembly(AssemblyDefinition assemblyDefinition, IAssemblyManager assemblyManager)
        {
            this.mAssemblyDefinition = assemblyDefinition;
            this.AssemblyManager = assemblyManager;
        }

        #endregion Lifecycle

        #region IAssembly Members

        public IAssemblyManager AssemblyManager { get; set; }

        public IMethodDeclaration EntryPoint
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public HashAlgorithm HashAlgorithm
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IModuleCollection Modules
        {
            get
            {
                return new ModuleCollection(
                    new Collection<ModuleDefinition>(mAssemblyDefinition.Modules),
                    this);
            }
        }

        public IResourceCollection Resources
        {
            get { throw new NotImplementedException(); }
        }

        public string Status
        {
            get { throw new NotImplementedException(); }
        }

        public AssemblyType Type
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IAssemblyLocation Members

        public string Location
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IAssemblyReference Members

        public IModule Context
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string Culture
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public byte[] HashValue
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string Name
        {
            get
            {
                return mAssemblyDefinition.FullName;
            }
            set
            {
                throw new NotSupportedException();
            }
        }

        public byte[] PublicKey
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public byte[] PublicKeyToken
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IAssembly Resolve()
        {
            throw new NotImplementedException();
        }

        public bool Retargetable
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public Version Version
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IComparable Members

        public int CompareTo(object obj)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region ICustomAttributeProvider Members

        public ICustomAttributeCollection Attributes
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}
